<fieldset class="fields1">
	<!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->

	<!-- IF S_PRIVMSGS and not S_SHOW_DRAFTS -->

		<div class="column1">
		<!-- IF S_ALLOW_MASS_PM -->
			<!-- IF .to_recipient -->
				<dl>
					<dt><label>{L_TO}:</label></dt>
					<dd>
						<!-- BEGIN to_recipient -->
							<!-- IF not to_recipient.S_FIRST_ROW and to_recipient.S_ROW_COUNT mod 2 eq 0 --></dd><dd><!-- ENDIF -->
							<!-- IF to_recipient.IS_GROUP --><a href="{to_recipient.U_VIEW}"><strong>{to_recipient.NAME}</strong></a>&nbsp;<!-- ELSE -->{to_recipient.NAME_FULL}&nbsp;<!-- ENDIF -->
							<!-- IF not S_EDIT_POST --><input type="submit" name="remove_{to_recipient.TYPE}[{to_recipient.UG_ID}]" value="x" class="button2" />&nbsp;<!-- ENDIF -->
						<!-- END to_recipient -->
					</dd>
				</dl>
			<!-- ENDIF -->
			<!-- IF .bcc_recipient -->
				<dl>
					<dt><label>{L_BCC}:</label></dt>
					<dd>
						<!-- BEGIN bcc_recipient -->
							<!-- IF not bcc_recipient.S_FIRST_ROW and bcc_recipient.S_ROW_COUNT mod 2 eq 0 --></dd><dd><!-- ENDIF -->
							<!-- IF bcc_recipient.IS_GROUP --><a href="{bcc_recipient.U_VIEW}"><strong>{bcc_recipient.NAME}</strong></a><!-- ELSE -->{bcc_recipient.NAME_FULL}&nbsp;<!-- ENDIF -->
							<!-- IF not S_EDIT_POST --><input type="submit" name="remove_{bcc_recipient.TYPE}[{bcc_recipient.UG_ID}]" value="x" class="button2" />&nbsp;<!-- ENDIF -->
						<!-- END bcc_recipient -->
					</dd>
				</dl>
			<!-- ENDIF -->
			<!-- IF not S_EDIT_POST -->
			<dl class="pmlist">
				<dt><textarea id="username_list" name="username_list" class="inputbox" cols="50" rows="2" tabindex="1"></textarea></dt>
				<dd><span><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a></span></dd>
				<dd><input type="submit" name="add_to" value="{L_ADD}" class="button2" tabindex="1" /></dd>
				<dd><input type="submit" name="add_bcc" value="{L_ADD_BCC}" class="button2" tabindex="1" /></dd>
			</dl>
			<!-- ENDIF -->
		<!-- ELSE -->
			<dl>
				<dt><label for="username_list">{L_TO}:</label><!-- IF not S_EDIT_POST --><br /><span><a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false">{L_FIND_USERNAME}</a></span><!-- ENDIF --></dt>
				<!-- IF .to_recipient -->
					<dd>
						<!-- BEGIN to_recipient -->
							<!-- IF not to_recipient.S_FIRST_ROW and to_recipient.S_ROW_COUNT mod 2 eq 0 --></dd><dd><!-- ENDIF -->
							<!-- IF to_recipient.IS_GROUP --><a href="{to_recipient.U_VIEW}"><strong>{to_recipient.NAME}</strong></a><!-- ELSE -->{to_recipient.NAME_FULL}&nbsp;<!-- ENDIF -->
							<!-- IF not S_EDIT_POST --><input type="submit" name="remove_{to_recipient.TYPE}[{to_recipient.UG_ID}]" value="x" class="button2" />&nbsp;<!-- ENDIF -->
						<!-- END to_recipient -->
					</dd>
				<!-- ENDIF -->

				<!-- IF not S_EDIT_POST -->
				<dd><input class="inputbox" type="text" name="username_list" id="username_list" size="20" value="" /> <input type="submit" name="add_to" value="{L_ADD}" class="button2" /></dd>
				<!-- ENDIF -->
			</dl>
		<!-- ENDIF -->

		</div>

		<!-- IF S_GROUP_OPTIONS -->
			<div class="column2">
				<dl>
					<dd><label for="group_list">{L_USERGROUPS}:</label> <select name="group_list[]" id="group_list" multiple="multiple" size="4" class="inputbox">{S_GROUP_OPTIONS}</select></dd>
				</dl>
			</div>
		<!-- ENDIF -->

		<div class="clear"></div>

	<!-- ENDIF -->

	<!-- IF S_SHOW_TOPIC_ICONS or S_SHOW_PM_ICONS -->
	<dl>
		<dt><label for="icon">{L_ICON}:</label></dt>
		<dd>
			<label for="icon"><input type="radio" name="icon" id="icon" value="0" checked="checked" tabindex="1" /> <!-- IF S_SHOW_TOPIC_ICONS -->{L_NO_TOPIC_ICON}<!-- ELSE -->{L_NO_PM_ICON}<!-- ENDIF --></label>
			<!-- BEGIN topic_icon --><label for="icon-{topic_icon.ICON_ID}"><input type="radio" name="icon" id="icon-{topic_icon.ICON_ID}" value="{topic_icon.ICON_ID}" {topic_icon.S_ICON_CHECKED} tabindex="1" /><img src="{topic_icon.ICON_IMG}" width="{topic_icon.ICON_WIDTH}" height="{topic_icon.ICON_HEIGHT}" alt="" title="" /></label> <!-- END topic_icon -->
		</dd>
	</dl>
	<!-- ENDIF -->

	<!-- IF not S_PRIVMSGS and S_DISPLAY_USERNAME -->
	<dl style="clear: left;">
		<dt><label for="username">{L_USERNAME}:</label></dt>
		<dd><input type="text" tabindex="1" name="username" id="username" size="60" maxlength="35" value="{USERNAME}" class="inputbox autowidth" /></dd>
	</dl>
	<!-- IF not S_EDIT_POST -->
	<script>
	jQuery(function($)
	{
		if (!('localStorage' in window && window['localStorage'] !== null) || $('#username').val()) return;
		$('#username').val(localStorage.getItem('anonymous_username')).on('keyup', function()
		{
			localStorage.setItem('anonymous_username', $(this).val());
		});
	});
	</script>
	<!-- ENDIF -->
	<!-- ENDIF -->

	<!-- IF S_POST_ACTION or S_PRIVMSGS or S_EDIT_DRAFT -->
	<dl style="clear: left;">
		<dt><label for="subject">{L_SUBJECT}:</label></dt>
		<dd><input type="text" name="subject" id="subject" size="60" maxlength="90" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" /></dd>
	</dl>
	<!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_CODE -->
		<!-- DEFINE $CAPTCHA_TAB_INDEX = 3 -->
		<!-- INCLUDE {CAPTCHA_TEMPLATE} -->
	<!-- ENDIF -->
	<!-- ENDIF -->

	<!-- INCLUDE posting_buttons.html -->

	<div id="smiley-box">
		<!-- IF S_SMILIES_ALLOWED and .smiley -->
			<!-- BEGIN smiley -->
				<a href="#" onclick="insert_text('{smiley.A_SMILEY_CODE}', true); return false;"><img src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" height="{smiley.SMILEY_HEIGHT}" alt="{smiley.SMILEY_CODE}" title="{smiley.SMILEY_DESC}" /></a>
			<!-- END smiley -->
		<!-- ENDIF -->
		<!-- IF S_SHOW_SMILEY_LINK and S_SMILIES_ALLOWED-->
			<a href="{U_MORE_SMILIES}" onclick="popup(this.href, 300, 350, '_phpbbsmilies'); return false;">{L_MORE_SMILIES}</a>
		<!-- ENDIF -->

		<!-- IF S_SMILIES_ALLOWED and .smiley --><hr /><!-- ENDIF -->

		<!-- IF S_BBCODE_ALLOWED -->
			<div><label for="disable_bbcode"><input type="checkbox" name="disable_bbcode" id="disable_bbcode"{S_BBCODE_CHECKED} /> {L_DISABLE_BBCODE}</label></div>
		<!-- ENDIF -->
		<!-- IF S_SMILIES_ALLOWED -->
			<div><label for="disable_smilies"><input type="checkbox" name="disable_smilies" id="disable_smilies"{S_SMILIES_CHECKED} /> {L_DISABLE_SMILIES}</label></div>
		<!-- ENDIF -->
		<!-- IF S_LINKS_ALLOWED -->
			<div><label for="disable_magic_url"><input type="checkbox" name="disable_magic_url" id="disable_magic_url"{S_MAGIC_URL_CHECKED} /> {L_DISABLE_MAGIC_URL}</label></div>
		<!-- ENDIF -->
		<!-- IF S_SIG_ALLOWED -->
			<div><label for="attach_sig"><input type="checkbox" name="attach_sig" id="attach_sig"{S_SIGNATURE_CHECKED} /> {L_ATTACH_SIG}</label></div>
		<!-- ENDIF -->
		<!-- IF S_FIRST_POST_SHOW_ALLOWED -->
			<div><label for="topic_first_post_show" title="{L_FIRST_POST_SHOW_EXPLAIN}"><input type="checkbox" name="topic_first_post_show" id="topic_first_post_show"{S_FIRST_POST_SHOW_CHECKED} /> {L_FIRST_POST_SHOW}</label></div>
		<!-- ENDIF -->
		<!-- IF S_USER_LOGGED_IN and not S_EDIT_POST and not S_NEW_MESSAGE and not $SIG_EDIT eq 1 and not S_PRIVMSGS and not S_SHOW_DRAFTS -->
			<div><label for="do_not_merge"><input type="checkbox" name="do_not_merge" id="do_not_merge" /> {L_DO_NOT_MERGE}</label></div>
		<!-- ENDIF -->

		<!-- IF S_LOCK_POST_ALLOWED or S_LOCK_TOPIC_ALLOWED or S_NOTIFY_ALLOWED --><hr /><!-- ENDIF -->

		<!-- IF S_NOTIFY_ALLOWED -->
			<div><label for="notify"><input type="checkbox" name="notify" id="notify"{S_NOTIFY_CHECKED} /> {L_NOTIFY_REPLY}</label></div>
		<!-- ENDIF -->
		<!-- IF S_LOCK_TOPIC_ALLOWED -->
			<div><label for="lock_topic"><input type="checkbox" name="lock_topic" id="lock_topic"{S_LOCK_TOPIC_CHECKED} /> {L_LOCK_TOPIC}</label></div>
		<!-- ENDIF -->
		<!-- IF S_LOCK_POST_ALLOWED -->
			<div><label for="lock_post"><input type="checkbox" name="lock_post" id="lock_post"{S_LOCK_POST_CHECKED} /> {L_LOCK_POST}</label></div>
		<!-- ENDIF -->
	</div>

	<div id="message-box">
		<textarea <!-- IF S_UCP_ACTION and not S_PRIVMSGS and not S_EDIT_DRAFT -->name="signature" id="signature" style="height: 9em;"<!-- ELSE -->name="message" id="message"<!-- ENDIF --> rows="15" cols="76" tabindex="4" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" class="inputbox">{MESSAGE}{DRAFT_MESSAGE}{SIGNATURE}</textarea>
	</div>
</fieldset>

<!-- IF $EXTRA_POSTING_OPTIONS eq 1 -->

	<!-- IF not S_SHOW_DRAFTS -->
		<span class="corners-bottom"><span></span></span></div>
	</div>
	<!-- ENDIF -->

	<!-- IF S_SHOW_ATTACH_BOX or S_HAS_ATTACHMENTS --><!-- INCLUDE posting_attach_body.html --><!-- ENDIF -->
	<!-- IF S_SHOW_POLL_BOX or S_POLL_DELETE --><!-- INCLUDE posting_poll_body.html --><!-- ENDIF -->

	<!-- IF not S_SHOW_DRAFTS and not $SIG_EDIT eq 1 -->
	<div class="panel bg2">
		<div class="inner"><span class="corners-top"><span></span></span>

		<!-- IF S_TYPE_TOGGLE or S_TOPIC_TYPE_ANNOUNCE or S_TOPIC_TYPE_STICKY or S_EDIT_REASON or S_DELETE_ALLOWED -->
		<fieldset class="fields2">
			<!-- IF S_TYPE_TOGGLE -->
			<dl>
				<dt><label for="topic_type-0">{L_POST_TOPIC_AS}:</label></dt>
				<dd><!-- BEGIN topic_type --><label for="topic_type-{topic_type.VALUE}"><input type="radio" name="topic_type" id="topic_type-{topic_type.VALUE}" value="{topic_type.VALUE}"{topic_type.S_CHECKED} />{topic_type.L_TOPIC_TYPE}</label> <!-- END topic_type --></dd>
			</dl>
			<!-- ENDIF -->

			<!-- IF S_TOPIC_TYPE_ANNOUNCE or S_TOPIC_TYPE_STICKY -->
			<script type="text/javascript">
			jQuery(function($)
			{
				$("#postform input[name=topic_type]").change(function()
				{
					if ($(this).val() == 0) $(".only-for-announces").hide(); else $(".only-for-announces").show();
				});
				$("#postform input[name=topic_type]:checked").change();
			});
			</script>

			<dl class="only-for-announces">
				<dt><label for="topic_time_limit">{L_STICK_TOPIC_FOR}:</label></dt>
				<dd><label for="topic_time_limit"><input type="text" name="topic_time_limit" id="topic_time_limit" size="3" maxlength="3" value="{TOPIC_TIME_LIMIT}" class="inputbox autowidth" /> {L_DAYS} {L_STICK_TOPIC_FOR_EXPLAIN}</label></dd>
			</dl>
			<dl class="only-for-announces">
				<dt><label for="topic_priority">{L_TOPIC_PRIORITY}:</label></dt>
				<dd><label for="topic_priority"><input type="text" name="topic_priority" id="topic_priority" size="3" maxlength="5" value="{TOPIC_PRIORITY}" class="inputbox autowidth" /> {L_TOPIC_PRIORITY_EXPLAIN}</label></dd>
			</dl>
			<!-- ENDIF -->

			<!-- IF S_DELETE_ALLOWED -->
			<dl>
				<dt><label for="delete">{L_DELETE_POST}:</label></dt>
				<dd><label for="delete"><input type="checkbox" name="delete" id="delete" /> {L_DELETE_POST_WARN}</label></dd>
			</dl>
			<!-- ENDIF -->

			<!-- IF S_EDIT_REASON -->
			<dl>
				<dt><label for="edit_reason">{L_EDIT_REASON}:</label></dt>
				<dd><input type="text" name="edit_reason" id="edit_reason" value="{EDIT_REASON}" class="inputbox" /></dd>
			</dl>
			<!-- ENDIF -->
		</fieldset>
		<!-- ENDIF -->



		<fieldset class="submit-buttons">
			{S_HIDDEN_ADDRESS_FIELD}
			{S_HIDDEN_FIELDS}
			<!-- IF S_HAS_DRAFTS --><input type="submit" accesskey="d" tabindex="8" name="load" value="{L_LOAD_DRAFT}" class="button2" onclick="load_draft = true;" />&nbsp; <!-- ENDIF -->
			<!-- IF S_SAVE_ALLOWED --><input type="submit" accesskey="k" tabindex="7" name="save" value="{L_SAVE_DRAFT}" class="button2" />&nbsp; <!-- ENDIF -->
			<input type="submit" tabindex="5" name="preview" value="{L_PREVIEW}" class="button1 alternate-submit-action" />&nbsp;
			<input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1 default-submit-action" />&nbsp;

		</fieldset>

		<span class="corners-bottom"><span></span></span></div>
	</div>
	<!-- ENDIF -->

	<div class="panel bg3" style="display: none;">
		<div class="inner"><span class="corners-top"><span></span></span>

<!-- ENDIF -->